package com.example.demo.mapper;

import com.example.demo.entity.VideoLike;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

public class VideoLikeMapper implements RowMapper<VideoLike> {
    @Override
    public VideoLike mapRow(ResultSet resultSet, int i) throws SQLException {
        VideoLike v = new VideoLike();
        v.setId(resultSet.getInt("OBJID"));
        v.setLikeName(resultSet.getString("LIKENAME"));
        v.setVideoId(resultSet.getInt("VIDEOID"));
        v.setLikeTime(resultSet.getString("LIKETIME"));
        return v;
    }
}
